﻿@model WaiGaoQiaoWeb.Models.LogOnModel
@{
    Layout = null;
}
<!DOCTYPE html>
<html>
<head>
    <title>用户登录页面</title>
    <link href="@Url.Content("~/Themes/Default/login.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery-1.7.1.min.js")" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#LogName").focus();
            $("#LogName").bind('keydown', function (e) {
                var key = e.which;
                if (key == 13) {
                        e.preventDefault();
                        if ($(this).val() != "") {
                            $("#LogPassword").focus();
                        }
                        else {
                            alert("请检查输入的用户名称！");
                            return false;
                        }
                }
            });
            $("#buttonlog").click(function () {
                if ($("#LogName").val() == "") {
                    alert("请输入用户名称！");
                    $("#LogName").focus();
                    return false;
                } else if ($("#LogPassword").val() == "") {
                    alert("请输入用户密码！");
                    $("#LogPassword").focus();
                    return false;
                }

            });  //end of buttonlog.click
        });               // end of document 
    </script>
</head>
<body>
    @using (Html.BeginForm("LogOn", "Account", FormMethod.Post))
    {
        <div>
            <div id="loginWrapper">
                <div id="loginFormWrapper">
                    <div id="loginForm">
                        <div id="loginTxtWrapper">
                            <div class="loginInfo">
                                <div class="loginlbl">
                                    @Html.LabelFor(m => m.LogName)：</div>
                                <div>
                                    @Html.TextBoxFor(m => m.LogName, new { @class = "logintxt" })</div>
                            </div>
                            <div class="loginInfo">
                                <div class="loginlbl">
                                    @Html.LabelFor(m => m.LogPassword)：</div>
                                <div>
                                    @Html.PasswordFor(m => m.LogPassword, new { @class = "logintxt" })
                                </div>
                            </div>
                            <div class="loginInfo">
                                <div class="loginlbl">
                                    &nbsp;</div>
                                <div style="color: Red; line-height: 24px;">@Html.DisplayFor(m => m.logError, new { @class = "logintxt" })</div>
                            </div>
                        </div>
                        <div id="loginBtnWrapper" class="">
                            <input type="submit" id="buttonlog" value="" />
                        </div>
                    </div>
                </div>
            </div>
        </div>    

    }
</body>
</html>
